#include <cstdio>
const int N = 100000010;
int n, q;
bool vis[N];
int pri[1000001];
int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
#endif
#endif

  // scanf("%d%d", &n, &q);
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    if (!vis[i]) {
      pri[++pri[0]] = i;
    }
    for (int j = 1; j <= pri[0] && i * pri[j] <= n; ++j) {
      vis[i * pri[j]] = true;
      if (i % pri[j] == 0) break;
    }
  }
  /* int t;
  for (int i = 0; i < q; ++i) {
          scanf("%d", &t);
          printf("%d\n", pri[t]);
  } */
  for (int i = 1; i <= pri[0]; ++i) {
    printf("%d, ", pri[i]);
  }
  return 0;
}